import axios from './index'

// 发送验证码
export const SendVerificationCode = (phoneNumber) =>
    axios({
        url: '/users/',
        method: 'POST',
        data: {
            phoneNumber
        }
    })

// 验证码登录/判断验证码是否正确
export const VerificationCode = (val) =>
    axios({
        url: '/users/',
        method: 'POST',
        data: {
            val
        }
    })

// 账号密码登录
export const userAndPwd = (userName, passWord) =>
    axios({
        url: 'http://1.14.106.61:7101/login',
        method: 'get',
        params: {
            userName,
            passWord
        }
    })

// 修改密码 
export const changePassword = (phone, passWord) => 
    axios({
        url: 'http://1.14.106.61:7101/updatePassWord',
        method: 'get',
        params: {
            phone,
            passWord
        }
    })


//判断是否设置登录密码
export const IfLoginPassword = (phone) =>
    axios({
        url: 'http://1.14.106.61:7101/phone',
        method: 'get',
        params: {
            phone
        }
    })




